package com.charlie.meetingmanagement.mapper;

import com.charlie.meetingmanagement.pojo.po.Request;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface RequestMapper {
    Long count(Integer userId, Integer rentalId, Integer meetingroomId, LocalDate meetingroomRentaldate,
               Integer meetingroomRentaltime, Integer approval);

    List<Request> page(Integer userId, Integer rentalId, Integer meetingroomId, LocalDate meetingroomRentaldate,
                       Integer meetingroomRentaltime, Integer approval);

    void updateApproval(Integer rentalId, Integer approval);

    Request getAllById(Integer rentalId);

    void insert(Integer userId, Integer meetingroomId, LocalDate meetingroomRentaldate, Integer meetingroomRentaltime,
                String rentalDescribe, int approval);

    List<Request> getRentalRequestById(Integer userId);

    List<Request>  getRentalInfo(String rentaldate, Integer meetingroomId, int approval);

    void addRequest(Integer userId, Integer meetingroomId, LocalDate meetingroomRentaldate, Integer meetingroomRentaltime, String rentalDescribe,Integer approval);
}
